import { S } from '../../s';
import { IPSAppUILogicRefView } from './ipsapp-uilogic-ref-view';
import { IPSAppUIOpenDataLogic } from './ipsapp-uiopen-data-logic';
import { PSAppUILogicImpl } from './psapp-uilogic-impl';

export class BuiltinPSAppUIOpenDataLogicImpl
  extends PSAppUILogicImpl
  implements IPSAppUIOpenDataLogic
{
  protected opendatapsappview: IPSAppUILogicRefView;
  getOpenDataPSAppView(): IPSAppUILogicRefView | null {
    return (
      this.opendatapsappview ||
      (this.opendatapsappview = this.fillObjectModel(
        S._5,
        this.M.getOpenDataPSAppView,
        S._372,
      ) as IPSAppUILogicRefView)
    );
  }

  protected opendatapsappviews: IPSAppUILogicRefView[];
  getOpenDataPSAppViews(): IPSAppUILogicRefView[] | null {
    return (
      this.opendatapsappviews ||
      (this.opendatapsappviews = this.fillChildListModel(
        this.M.getOpenDataPSAppViews,
        S._5,
      ) as IPSAppUILogicRefView[])
    );
  }

  get viewLogicType(): string {
    return this.M.viewLogicType;
  }

  get editMode(): boolean {
    return this.M.editMode;
  }
  get cls(): string {
    return 'BuiltinPSAppUIOpenDataLogicImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._280 || cls == S._282 || cls == S._27e || cls == S._27f)
      return true;
    return super.instanceof(cls);
  }
}
